const cloud = require('wx-server-sdk')
cloud.init()
exports.main = async (event, context) => {
  var m_begin_date = event.begin_date;
  var m_end_date = event.end_date;

  try {
    const result = await cloud.openapi.analysis.getDailySummary({
      beginDate: m_begin_date,
      endDate: m_end_date
    })
    console.log(result)
    return result
  } catch (err) {
    console.log(err)
    return err
  }
}